package com.gitee.wsl.collections.map

import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull


class Flat3MapTest {

    private fun putAndRemove(map: MutableMap<String, String>) {
        map.put("A" , "one" )
        map.put("B" , "two" )
        map.put("C" , "three" )
        val it = map.entries.iterator()

        val mapEntry1 = it.next()
        val mapEntry2 = it.next()
        val mapEntry3 = it.next()
        it.remove()

        assertEquals(2, map.size)
        assertEquals("one", map["A"])
        assertEquals("two", map["B"])
        assertNull(map["C"])
    }

    @Test
    fun baseTest(){
        putAndRemove(Flat3Map())
    }

}